package com.hegongda.okcmall.product.dao;

import com.hegongda.okcmall.product.entity.AttrAttrgroupRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 属性&属性分组关联
 * 
 * @author Liuweidong
 * @email Liuweidong@gmail.com
 * @date 2021-01-31 17:57:14
 */
@Mapper
public interface AttrAttrgroupRelationDao extends BaseMapper<AttrAttrgroupRelationEntity> {

    @Select("select attr_id from pms_attr_attrgroup_relation where attr_group_id = #{id}")
    List<Long> getAttrIdByGroupId(@Param("id") String groupId);

    void deleteBatch(@Param("entities") List<AttrAttrgroupRelationEntity> entities);

}
